# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Vamp898 <vamp898@web.de>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Todd Maynard <arch@toddmaynard.com>

pkgname=kmymoney
pkgver=5.1.3
pkgrel=6
pkgdesc="Personal finance manager for KDE which operates similarly to MS-Money or Quicken"
arch=('loong64' 'x86_64')
url="https://kmymoney.org/"
license=('GPL')
depends=('aqbanking' 'gwenhywfar' 'libalkimia' 'sqlcipher' 'qt5-base' 'qt5-webengine' 'qgpgme' 'karchive'
         'kcoreaddons' 'kconfig' 'kwidgetsaddons' 'ki18n' 'kcompletion' 'kcmutils' 'kitemmodels'
         'kitemviews' 'kservice' 'kwallet' 'kiconthemes' 'kxmlgui' 'kidentitymanagement'
         'ktextwidgets' 'knotifications' 'kio' 'kholidays' 'kactivities'
         'kqtquickcharts' 'kdiagram' 'kcontacts' 'libical' 'libakonadi' 'shared-mime-info' 'libofx')
makedepends=('extra-cmake-modules' 'kdoctools' 'doxygen')
optdepends=('perl: for financequote.pl')
changelog=$pkgname.changelog
source=(https://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
validpgpkeys=('D69A745A55331F44F404D8258D4DE062AA2EB01C')
sha256sums=('3938b8078b7391ba32e12bb4239762fae134683a0c2ec1a75105c302ca3e5e3f'
            'SKIP')

build() {
  cd "${srcdir}"/$pkgname-$pkgver

  mkdir build
  cd build

  cmake ../ \
    -DENABLE_WEBENGINE=ON \
    -DCMAKE_SKIP_RPATH=YES \
    -Wno-dev
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver/build

  make DESTDIR="${pkgdir}" install
}
